<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="pt_BR"/>
<!DOCTYPE html>
<html lang="en">
  <head>
  	<c:import url="../includes/headBootstrap.jsp"/>
    <title>Home</title>
  </head>
  <body>
    <c:import url="../includes/header.jsp"/>

	<div class="container">
	
		<div class="row">
  			<div class="col-lg-2 col-md-3 col-sm-3 col-xs-3">
				<div class="panel panel-black">
			      <div class="panel-heading">
			        <h3 class="panel-title">
			        	Vencimento
					</h3>
			      </div>
			      <div class="panel-body">
			       	<fmt:formatDate pattern="dd/MM/yyyy" value="${fatura.dtVencimento}" />
			      </div>
			    </div>
	    	</div>
	    	
			<div class="col-lg-2 col-md-4 col-sm-4 col-xs-4">	    		
				<div class="panel panel-black">
			      <div class="panel-heading">
			        <h3 class="panel-title">
			        	Total desta Fatura
					</h3>
			      </div>
			      <div class="panel-body">
			       	<fmt:formatNumber value="${fatura.valorFatura/100}" type="currency"/>
			      </div>
			    </div>
	    	</div>
	    </div>
	    <br>
	    
	    <table class="table">
	    	<tr>
	    		<th>Data</th>
	    		<th>Descri&ccedil;&atilde;o</th>
	    		<th>Parcelas</th>
	    		<th>R$</th>	    		
	    	</tr>
	    	<c:forEach items="${itensFatura}" var="itemFatura">
	    	<tr>
	    		<td>
	    			<fmt:formatDate pattern="dd/MM/yyyy" value="${itemFatura.dtOrigemCompra}" />	    			
				</td>
	    		<td>${itemFatura.descItemFatura}</td>
	    		<td>${itemFatura.numParcela}/${itemFatura.qtdParcelas}</td>
	    		<td>
	    			<fmt:formatNumber value="${itemFatura.valorItemFatura/100}" type="currency" currencySymbol=""/>
				</td>	    		
	    	</tr>
	    	</c:forEach>
	    
	    </table>
	    	
			    	
	</div>

	<c:import url="../includes/footBootstrap.jsp"/>    
  </body>
</html>